from typing import Annotated, Sequence, TypedDict
from typing_extensions import TypedDict
from langchain_core.messages import BaseMessage

class AgentState(TypedDict):
    """
    Centralized state definition that can be used by all agents.
    This makes it easier to extend with new agent types.
    """
    messages: Sequence[BaseMessage]
    next: str
    rag_needed: bool
    rag_response: str
    tool_response: str
    agent_action: str
    agent_response: str
    current_agent: str